/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */
package io.renren.datasource.config

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource

/**
 * 多数据源
 *
 * @author Mark sunlightcs@gmail.com
 */
class DynamicDataSource : AbstractRoutingDataSource() {
    override fun determineCurrentLookupKey(): Any? {
        return DynamicContextHolder.peek()
    }
}